package com.huang.mapper;

import com.huang.entity.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.SelectKey;

public interface OrderMapper {


    @SelectKey(statement = "SELECT REPLACE(UUID(),'-','')",
            keyProperty = "id", before = true, resultType = String.class)
    @Insert("INSERT INTO t_order(id,name) VALUES(#{id},#{name})")
    void insertOrder(Order order);
}